﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Sustainalytics.ReportGenerator.BL;
using Sustainalytics.ClientDW.Entities;

namespace Sustainalytics.ReportGenerator.BusinessLogic.Tests
{
    [TestClass]
    public class ReportPdfRendererTest
    {
        [TestInitialize]
        public void Initialize()
        {
            SetupFakeData();
        }

        #region Fake data

        private CorporateData _corporateData;
        private FinancialData _financialData;
        private ReferenceData _referenceData;

        private void SetupFakeData()
        {
            _corporateData = new CorporateData
            {
                Id = new Guid("00000001-0000-0000-0000-000000000000"),
                CompanyName = "Vedanta Resources plc",
                CompanyType = CompanyTypes.Type_A.ToString(),
                Country = "United Kingdom",
                Region = "Region",
                PeerGroupShortName = "Diversified Metals",
                RootPeerGroup = "Peer Group",
                GICSIndustry = "Industry",
                GICSIndustryGroup = "Industry Group",
                GICSSector = "Sector",
                GICSSubIndustry = "Sub Industry",
                CapitalIQID = "123456789",
                TotalEmployees = 86479,
                LastFinalization = "15 December 2014"
            };

            _financialData = new FinancialData
            {
                Id = new Guid("00000001-0000-0000-0000-000000000000"),
                MarketCapitalization = 4167
            };

            _referenceData = new ReferenceData
            {
                Id = new Guid("00000001-0000-0000-0000-000000000000"),
                MainIsin = "ISIN",
                MainSedol = "Sedol",
                MainTicker = "LSE:VED"
            };

        }

        #endregion

        
        [TestMethod]
        public void GetPdfDocumentTest()
        {
            var companyId = Guid.Empty;

            var companyReportDataOffline = new CompanyReportDataOffline()
            {
                CorporateData = _corporateData,
                FinancialData = _financialData,
                ReferenceData = _referenceData
            };
            companyReportDataOffline.LoadData(companyId);

            var reportPdfRenderer = new ReportPdfRenderer(companyReportDataOffline);

        }
    }
}
